<?php
return array(
    // 校验工具类规则初始化
    'VALIDATE_UTIL_CUSTOM_RULE' => array(
        'notnull' => array(NULL, NULL, '403,212,error'),
        'notempty' => array(NULL, NULL, '403,214,error'),
        'mobile' => array(NULL, NULL, '403,213,error'),
        'password' => array(NULL, NULL, '403,213,error'),
        'vcode' => array('regex', '/^\d{4}$/', '403,213,error'),

        'isDate' => array('function', array('checkTimeStrFormat', 'Y-m-d'), '403,213,error'),

        // ID检验
        'id' => array('regex', "/^\d{1,10}$/", '403,213,error'),

        'imageCode' => array('regex', '/^[0-9a-zA-Z]{4}$/', '403,213,error'),

        'length20' => array('mblength', '1,20,utf-8', '403,213,error'),
        'length255' => array('mblength', '1,255,utf-8', '403,213,error'),
        'length50' => array('mblength', '1,50,utf-8', '403,213,error'),
        //'IDCard' => array('regex', '/^[a-zA-z0-9]{0,18}$/', '403,213,error'),
        'IDCard' => array('callback', 'validateIdCard', '403,204,error'),
        
        // 优惠券相关校验
        'cpOrder' => array('regex', '/^CP\d{1,10}$/', '403,213,error'),
        'ucpOrder' => array('regex', '/^UCP\d{1,10}$/', '403,213,error'),
        
        // 价格校验
        'decimal8_2' => array('regex', '/^(-)?(\d{1,6})((\.\d{1,2})?)$/', '403,213,error'),
    ),
);

